laravel save relationship to authorized user with parameter

134

laravel save relationship to authorized user with parameter -

auth()
    ->user()
    ->projects()
    ->attach(Project::find($request->project_id), [
        'start_date' => $request->start_date
    ]);

Comments

Submit
0 Comments